<!-- 修改后的 index.html 页面 -->
<!DOCTYPE html>
<html  xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">

<head>
    <title>体检评估查询</title>
    <meta charset="UTF-8">
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f5f5f5;
        }
        .title{
            margin-top: 35px;
            margin-left: 20%;

        }
        .p1{
            margin-top: 75px;
            font-size: 25px;
        }
        form {
            max-width: 425px;
            margin: 0 auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        label {
            display: block;
            margin-bottom: 5px;
            color: #666;
        }

        input[type="text"] {
            margin-top: 25px;
            width: 95%;
            padding: 10px;
            border: 1px solid #ccc;
            border-radius: 5px;
        }

        button[type="submit"] {
            display: block;
            width: 50%;
            padding: 10px;
            background-color: #333;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin-top: 25px;
            margin-left: auto;
            margin-right: auto;
        }

        ul {
            list-style-type: none;
            padding: 0;
        }

        li {
            color: #666;
        }

        table {
            width: 95%;
            border-collapse: collapse;
            margin-top: 55px;
            margin-right: auto;
            margin-left: auto;
    }

    th, td {
        border: 1px solid #ddd;
        padding: 8px;
        text-align: left;
    }

    th {
        background-color: #f2f2f2;
    }
        a{
            margin: 25px 25px;
            padding: 10px;
            color: gray;
            text-decoration: none;
        }
        a:hover{
            color: black;
            background-color:#DDDDDD;

        }
        .p2{
            font-size: 25px;
        }
    </style>
</head>

<body>
<div class="title">

    <a href="index.html">查看评估建议</a>
    <a href="index2.html">查看健康方案</a>
    <a href="index3.html">查看运动方案</a>
    <a href="index4.html">查看饮食库</a>
    <a href="index5.html">查看疾病库</a>

</div>

<p class="p1" align="center">体检评估查询</p>
<form action="/search/Assessment" method="post">
    <label for="assessmentName">请输入体检号:</label>
    <input type="text" id="assessmentName" name="assessmentName" formaction="assessmentName" required />
    <button type="submit">Search</button>
</form>
<table>
    <tr>
        <th>体检号</th>
        <th>评估结果</th>
        <th>建议</th>
        <th>创建时间</th>
        <th>状态</th>
    </tr>
    <div th:if="${results}">
        <ul>
            <li th:each="result : ${results}">
                <tr>
                    <!--/*@thymesVar id="result" type="com.linfnn.*"*/-->
                    <td th:text="${result.assessmentName}"></td>
                    <td th:text="${result.assessmentResult}"></td>
                    <td th:text="${result.suggestion}"></td>
                    <td th:text="${result.creationTime}"></td>
                    <td th:text="${result.status}"></td>
                </tr>
            </li>
        </ul>
    </div>
</table>

<div th:if="${results == null}">
    <p class="p2" align="center">结果为空！</p>
</div>
</body>

</html>
